package com.kylin.dal.entity.marketing;

import com.kylin.shared.common.entity.BaseEntry;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import javax.persistence.*;
import java.io.Serializable;

/**
 * 营销主表
 * @author Damon S.
 * @version v1.0.1
 * @date 2020年05月28日 23:22
 */
@Entity
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "t_marketing_campaign", catalog = "db_kylin_artwork")
public class MarketingCampaignEntry extends BaseEntry implements Serializable {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    private Long campaignId;

    @Column(length = 64)
    private String name;
    @Column private Integer type;
    @Column private Integer sort;


    @Column(name = "state")
    private Integer campaignState;

    @Column(name = "pay_phase", columnDefinition = "TINYINT")
    private Integer payPhase;

    @Column(name = "start_at")
    private Long startAt;

    @Column(name = "stop_at")
    private Long stopAt;

    @Column(name = "created_at", updatable = false, nullable = false)
    private Long createdAt;

    @Column(name = "created_by", updatable = false, nullable = false)
    private Long createdBy;

    @Column(name = "paused_at")
    private Long pausedAt;

    @Column(name = "paused_by")
    private Long pausedBy;

    @Column(name = "updated_at")
    private Long updatedAt;

    @Column(name = "updated_by")
    private Long updatedBy;
}
